<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action=""  method="post" id="cp-form">.

            <div class="layui-form-item">
                <label class="layui-form-label">标题 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="title" value="{$api.title}" required  lay-verify="required" placeholder="标题" autocomplete="off" class="layui-input">
                </div>
                <label class="layui-form-label"> api栏目 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input apicate"  data-url="{:url('admin/openservice.openserviceapi/addapi')}"  value="{$cate.title}">
                    <input type="hidden" name="parent_id"  value="{$api.parent_id}" required  lay-verify="required"  placeholder="所属栏目" autocomplete="off" class="layui-input ">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">标识 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="name" value="{$api.name}" required  lay-verify="required" placeholder="标识" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux">请保持在系统中有唯一性请按照：api/category/index 格式填写</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">认证方式 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="type" id="type" >
                        <option value="1" {eq name="$api.type" value="1"}selected{/eq}>实时认证</option>
                        <option value="2" {eq name="$api.type" value="2"}selected{/eq}>登录验证</option>
                    </select>
                </div>
                <label class="layui-form-label">状态 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="status">
                        <option value="1" {eq name="$api.status" value="1"}selected{/eq}>正常</option>
                        <option value="0" {eq name="$api.status" value="0"}selected{/eq}>禁用</option>
                    </select>
                </div>
                <label class="layui-form-label">开放 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="is_release">
                        <option value="1" {eq name="$api.is_release" value="1"}selected{/eq}>是</option>
                        <option value="0" {eq name="$api.is_release" value="0"}selected{/eq}>否</option>
                    </select>
                </div>

                <label class="layui-form-label">自动验证 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="auth">
                        <option value="1" {eq name="$api.auth" value="1"}selected{/eq}>是</option>
                        <option value="0" {eq name="$api.auth" value="0"}selected{/eq}>否</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">附加条件</label>
                <div class="layui-input-block">
                    <textarea name="condition" id="" cols="30" rows="10" class="layui-textarea" placeholder="score < 30">{$api.condition|default=''}</textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="hidden" name="id" value="{$api.id}">
                    <div class="layui-text">带 * 号的为必填项</div>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <a href="{:url('admin/openservice.openserviceapi/index')}" class="layui-btn layui-btn-primary" >返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
